<?php /* Smarty version 2.6.20, created on 2008-11-03 08:57:19
         compiled from reg.html */ ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EuGenius Plastics</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<script language="javascript" src="js/common.js" type="text/javascript"></script>
<script language="javascript" src="js/cookies.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    setCookie("b2b_userType", "buyer");
    function login()
    {
        if (trim(document.getElementById("logindd_email").value) == "") {
            alert("Please input username.");
            document.getElementById("login_email").focus();
            return false;
        }

        if (trim(document.getElementById("login_passwd").value) == "") {
            alert("Please input passwd");
            document.getElementById("login_passwd").focus();
            return false;
        }

        return true;
    }
    
	function validate()
	{
        var email = trim(document.getElementById("email").value);
	    if (email == "") {
		    alert("Please input email.");
			document.getElementById("email").focus();
            return false;
		} else if (!checkEmail(email)) {
		    document.getElementById("email").focus();
            return false;
		}

		if (trim(document.getElementById("passwd").value) == "") {
			alert("Please input password.");
			document.getElementById("passwd").focus();
			return false;
		}

		if (trim(document.getElementById("repasswd").value) != trim(document.getElementById("passwd").value)) {
			alert("Passwords are not the same.");
			document.getElementById("repasswd").focus();
			return false;
		}

		if (trim(document.getElementById("telephone").value) == "") {
			alert("Please input telephone number.");
			document.getElementById("telephone").focus();
			return false;
		}

		if (trim(document.getElementById("details").value) == "") {
			alert("Please input contact details.");
			document.getElementById("detials").focus();
			return false;
		}

		if (trim(document.getElementById("company").value) == "") {
			alert("Please input company name.");
			document.getElementById("company").focus();
			return false;
		}

		if (trim(document.getElementById("firstName").value) == "") {
			alert("Please input first name.");
			document.getElementById("firstName").focus();
			return false;
		}

		if (trim(document.getElementById("lastName").value) == "") {
			alert("Please input last name.");
			document.getElementById("lastName").focus();
			return false;
		}

		if (trim(document.getElementById("address1").value) == "") {
			alert("Please input address1.");
			document.getElementById("address1").focus();
			return false;
		}

		if (trim(document.getElementById("address2").value) == "") {
			alert("Please input address2.");
			document.getElementById("address2").focus();
			return false;
		}

		if (trim(document.getElementById("city").value) == "") {
			alert("Please input city.");
			document.getElementById("city").focus();
			return false;
		}

		if (trim(document.getElementById("country").value) == "") {
			alert("Please input country");
			document.getElementById("country").focus();
			return false;
		}

		if (trim(document.getElementById("province").value) == "") {
			alert("Please input state/province");
			document.getElementById("province").focus();
			return false;
		}

		if (trim(document.getElementById("zipCode").value) == "") {
			alert("Please input post code.");
			document.getElementById("zipCode").focus();
			return false;
		}
		return true;
	}

	function next()
	{
		if (validate()) {
            setCookie("b2b_id", "-1");
		    setCookie("b2b_email", trim(document.getElementById("email").value));
            setCookie("b2b_passwd", trim(document.getElementById("passwd").value));
			setCookie("b2b_telephone", trim(document.getElementById("telephone").value));
			setCookie("b2b_details", trim(document.getElementById("details").value));
			setCookie("b2b_company", trim(document.getElementById("company").value));
			setCookie("b2b_firstName", trim(document.getElementById("firstName").value));
			setCookie("b2b_lastName", trim(document.getElementById("lastName").value));
			setCookie("b2b_address1", trim(document.getElementById("address1").value));
			setCookie("b2b_address2", trim(document.getElementById("address2").value));
			setCookie("b2b_city", trim(document.getElementById("city").value));
			setCookie("b2b_country", trim(document.getElementById("country").value));
			setCookie("b2b_province", trim(document.getElementById("province").value));
			setCookie("b2b_zipCode", trim(document.getElementById("zipCode").value));

			var userType = getCookie("b2b_userType");
            if (userType == "supplier") {
                window.location.href = "reg_supplier.php";
            } else if (userType == "buyer") {
                window.location.href = "reg_buyer.php";
            }

		} else {
			return false;
		}
	}

	function setToSupplier()
	{
		setCookie("b2b_userType", "supplier");
	}

	function setTobuyer()
	{
		setCookie("b2b_userType", "buyer");
	}

</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header_f.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div class="S_main"><img src="images/S_main.jpg" /></div>
  
  <!--H_main-->
<div class="SS_main2">
<div class="M_Tab"></div>
<div class="R_mzh">
  <div class="R_left">
    <div class="R_left3">
     <div class="S_left">
       <p><b>Get started with your free</b> <b class="STYLE4">buyers account</b></p>
       <p><span class="left2">This is free</span><span class="right">E-mail address</span></p>
       <p><span class="left2">Log on info</span><span class="right">Password</span></p>
       <p><span class="right">Confirm password</span></p>
       <p><span class="right">Telephone number</span></p>
       <p><span class="right">Contact details</span></p>
       <p><span class="right">Company name</span></p>
       <p><span class="right">First name</span></p>
       <p><span class="right">Last name</span></p>
       <p><span class="right">Address 1</span></p>
       <p><span class="right">Address 2</span></p>
       <p><span class="right">City</span></p>
       <p><span class="right">Country</span></p>
       <p><span class="right">State/ Province</span></p>
       <p><span class="right">Post code</span></p>
       

       <p>&nbsp;</p>
     </div>
     <div class="S_right"> 
       <p>&nbsp;</p>
      
       
       <p>
         <label>
         <input type="text" name="email" id="email" class="bi" />
         </label>
       </p>
       <p>
         <input type="password" name="passwd" id="passwd" class="bi" />
       </p>
       <p>
         <input type="password" name="repasswd" id="repasswd" class="bi" />
       </p>
       <p>
         <input type="text" name="telephone" id="telephone" class="bi" />
       </p>
       <p>
         <input type="text" name="details" id="details" class="bi" />
       </p>
       <p>
         <input type="text" name="company" id="company" class="bi" />
       </p>
       <p>
         <input type="text" name="firstName" id="firstName" class="bi" />
       </p>
       <p>
         <input type="text" name="lastName" id="lastName" class="bi" />
       </p>
       <p>
         <input type="text" name="address1" id="address1" class="bi" />
       </p>
       <p>
         <input type="text" name="address2" id="address2" class="bi" />
       </p>
       <p>
         <input type="text" name="city" id="city" class="bi" />
       </p>
       <p>
         <input type="text" name="country" id="country" class="bi" />
       </p>
       <p>
         <input type="text" name="province" id="province" class="bi" />
       </p>
       <p>
         <input type="text" name="zipCode" id="zipCode" class="bi" />
       </p>
       <p>&nbsp;</p>
       <p>&nbsp;</p>
       
       <p><input type="image" src="images/S1212120.jpg" alt="Next" onclick="javascript:next();"></p>
     </div>
    </div>
    <div class="R_left2"></div>
    
  </div>
  <div class="R_right">
    <div class="R_right2">
   
      <p>&nbsp;</p>
      <p id="Wl"><a class="how" onclick="javascript:setToSupplier();" href="#">Suppliers registration</a></p>
      <p id="Wl"><a class="how" onclick="javascript:setToBuyer();" href="#">Buyers registration</a></p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>1.  Fill in your details to receive 
     your free buyer account</p>
     
     <p>&nbsp;</p>
      <p>&nbsp;</p>
     <p>2.  Once the account has been 
     set up you can go into your 
     account and start using the 
     service</p>
     <p>&nbsp;</p>
      <p>&nbsp;</p>
     <p>3.  All information given is kept 
     strictly confidential</p>
    </div>
    <div class="R_right3"></div>
  </div>
 
 </div>
 <div class="M_bott"></div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer_f.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</div>
</body>
</html>	